credit2: Refactor runqueue initialization
authorKeir Fraser <keir@xen.org>
Fri, 24 Dec 2010 08:27:42 +0000 (08:27 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 24 Dec 2010 08:27:42 +0000 (08:27 +0000)
commit8a2042db62dc3f4b7d5e7b54d9b558dfcbfe9c41
treececc08f31929d0952a087bffc711a6f7238a6cea
parentd2f6b6016990b570c6782e1639ca1c0b07013b59
credit2: Refactor runqueue initialization

Several refactorizations:
* Add prv->initialized cpu mask
* Replace prv->runq_count with active_queue mask
* Replace rqd->cpu_min,cpu_mask with  active cpu mask
* Put locks in the runqueue structure, rather than borrowing the
existing cpu locks
* init() initializes all runqueues to NULL, inactive, and maps all
pcpus to runqueue -q
* alloc_pcpu() will add cpus to runqueues, "activating" the runqueue
if necessary.  All cpus are currently assigned to runqueue 0.

End-to-end behavior of the system should remain largely the same.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/common/sched_credit2.c